<template>
  <div class="app-container">
    <el-row class="mb8" :gutter="50">
      <el-col :span="1.5">
        <el-button type="primary" @click="submitForm">保存</el-button>
      </el-col>
    </el-row>
    <el-form ref="form" :model="form" :rules="rules">
      <el-form-item label="" prop="consultation">
        <el-input
          v-model="form.consultation"
          placeholder="请输入会诊意见"
          type="textarea"
          :rows="4"
          :autosize="{ minRows: 4, maxRows: 8 }"
          show-word-limit
          maxlength="1000"
          clearable
        />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "TableData",
  data() {
    return {
      // 遮罩层
      loading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        skipCount: 0,
        maxResultCount: 10,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  computed: {},
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
      // listProject(this.queryParams).then((response) => {
      //   this.projectList = response.rows
      //   this.total = response.total
      //   this.loading = false
      // })
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: undefined,
        consultation: undefined,
      };
      this.resetForm("form");
    },
    // 保存
    submitForm() {
      // this.$refs['form'].validate((valid) => {
      //   if (valid) {
      //     if (this.form.id != null) {
      //       updateProject(this.form).then((response) => {
      //         this.$modal.msgSuccess('编辑成功')
      //         this.open = false
      //         this.getList()
      //       })
      //     } else {
      //       addProject(this.form).then((response) => {
      //         this.$modal.msgSuccess('新增成功')
      //         this.open = false
      //         this.getList()
      //       })
      //     }
      //   }
      // })
    },
  },
};
</script>

<style>
</style>
